package com.syh.jn.scm.domain.supplier.event.finance;

import com.syh.core.ddd.domain.DomainEvent;
import com.syh.jn.scm.domain.supplier.entity.finance.SalesInvoice;
import com.syh.jn.scm.domain.supplier.entity.finance.StatementAccountBill;

public class SalesInvoiceEvent extends DomainEvent<StatementAccountBill> {

  public static final String SALES_INVOICE_CREATED = "salesInvoiceCreated";
  public static final String SALES_INVOICE_UPDATE = "salesInvoiceUpdate";
  public static final String SALES_INVOICE_DESTROY = "salesInvoiceDestroy";
  public static final String SALES_INVOICE_CONFIRM = "salesInvoiceConfirm";
  public static final String SALES_INVOICE_UNCONFIRM = "salesInvoiceUnconfirm";

  public static SalesInvoiceEvent buildCreated(Object[] values) {
    SalesInvoiceEvent stateEvent = new SalesInvoiceEvent();
    stateEvent.eventName = SALES_INVOICE_CREATED;
    stateEvent.values = values;
    return stateEvent;
  }

  public static SalesInvoiceEvent buildUpdate(Object[] values) {
    SalesInvoiceEvent stateEvent = new SalesInvoiceEvent();
    stateEvent.eventName = SALES_INVOICE_UPDATE;
    stateEvent.values = values;
    return stateEvent;
  }

  public static SalesInvoiceEvent buildDestroy(Object[] values) {
    SalesInvoiceEvent stateEvent = new SalesInvoiceEvent();
    stateEvent.eventName = SALES_INVOICE_DESTROY;
    stateEvent.values = values;
    return stateEvent;
  }

    public static DomainEvent salesInvoiceConfirm(Object[] values) {
      SalesInvoiceEvent stateEvent = new SalesInvoiceEvent();
      stateEvent.eventName = SALES_INVOICE_CONFIRM;
      stateEvent.values = values;
      return stateEvent;
    }

    public static DomainEvent salesInvoiceUnconfirm(Object[] values) {
      SalesInvoiceEvent stateEvent = new SalesInvoiceEvent();
      stateEvent.eventName = SALES_INVOICE_UNCONFIRM;
      stateEvent.values = values;
      return stateEvent;
    }

}
